import http from '../index'

// 分页获取客服
export const getCustomers = ({ ascended = null, current = null, size = null, sortFieldName = null, type = null }) => {
    return http.get("customer", { ascended, current, size, sortFieldName, type })
}

// 根据sid获取客服
export const getCustomerDetail = ({ sid }) => {
    return http.get("customer/" + sid)
}

// 新增客服
export const addCustomer = ({ address, phone, status, type, wechat }) => {
    return http.post("customer", { address, phone, status, type, wechat })
}

// 修改客服
export const editCustomer = ({ sid, address, phone, status, type, wechat }) => {
    return http.put("customer/" + sid, { address, phone, status, type, wechat })
}

// 批量删除客服
export const delCustomers = ({ sidList }) => {
    return http.put("customer/delete", { sidList })
}

// 根据sid启用-停用客服
export const changeCustomerStatus = ({ sid }) => {
    return http.put("customer/" + sid + '/status')
}



